package lab02.test33;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Scanner;

public class Test33 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        List<String> list = new ArrayList<String>();
        System.out.println("请输入若干个单词： ");
        String s = " ";
        s = sc.nextLine();
        String[] result = s.split(" ");
        for(int i = 0 ; i < result.length; i++) {
            list.add(result[i]);
        }

        Collections.sort(list);
        for(int i = 0; i < list.size(); i++) {
            System.out.println(list.get(i));
        }
    }
}


